package cyx.example.ddd.application.order.dto;

import cyx.example.ddd.domain.order.model.valueobject.OrderStatus;
import lombok.Data;

import java.time.Instant;
import java.util.List;

/**
 * 订单DTO
 */
@Data
public class OrderDTO {
    private String id;
    private String userId;
    private List<OrderItemDTO> items;
    private Double totalAmount;
    private String currency;
    private OrderStatus status;
    private Instant createdAt;
    private String cancelReason;

    @Data
    public static class OrderItemDTO {
        private Long id;
        private String productId;
        private String productName;
        private Double unitPrice;
        private Integer quantity;
        private Double totalPrice;
    }
}